#pragma once

#include "../shared/geom.h"
#include "../shared/Vector4f.h"
/**
==========================
Adds a Fade Effect to the screen,
Ex. Fades out black
==========================
*/
class FadeEffect
{
public:
    FadeEffect(void);

    /** Update the effects */
    void Update( long dt );

    /** Set Effect Size */
    void SetEffectSize( const Rect &size ) { m_size = size; };
    /** Get the Effect Size */
    Rect GetEffectSize() { return m_size; };

    /** Set Duration of effect */
    void   SetEffectTime( float msec ) { m_time = msec; };
    float  GetEffectTime() { return m_time; };

    /** Set Duration of effect */
    void SetEffectDuration( int msec ) { m_duration = msec; };
    int  GetEffectDuration() { return m_duration; };

    /** Set the effect start color */
    void SetStartColor( const Vector4f &color) { m_currentColor.Set( color ); m_startColor = color; };
    Vector4f GetStartColor() { return m_startColor; };

    /** Set the end effect color */
    void SetEndColor( const Vector4f &color ) { m_endColor = color; };
    Vector4f GetEndColor() { return m_endColor; };

    /** Get the Current Color */
    Vector4f GetCurrentColor() { return m_currentColor; };

private:
    Rect    m_size;
    float   m_time;
    int     m_duration;

    Vector4f    m_startColor,
                m_endColor;

    // intermidate color
    Vector4f  m_currentColor;   

public:
    virtual ~FadeEffect(void);
};
